﻿using MES.Server.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MES.Server.IService
{
    public interface IUserService: IBaseService
    {
        UserEntity? CheckLogin(string username, string password);

        bool UpdatePassword(int id, string old_password, string new_password);

        UserEntity[] GetUsers(string key, string[] ds, string[] ps);

        UserEntity[] GetUsers(
            string key, string[] ds, string[] ps,
            int index, int size, ref int totalCount);
        UserEntity[] GetUsersByIds(int[] ids);

        int Update(UserEntity employee);

        int Delete(int[] ids);

        bool LockUser(int id, int status);

        bool CheckUserName(string username, int id);

        int SaveUserRoles(RoleUserEntity[] roleUser);

        int ResetPassword(int id);
    }
}
